package com.yesido.moshi.seven.inversion.threetypes.bynew;

/**
 * @author yesido
 * @description 通过构造方法传递
 * @date 2023-06-11 23:59
 * @Version 8.3
 */
public class OpenAndClose implements IOpenAndClose {
    public ITV tv; // 成员
    public OpenAndClose(ITV tv) { // 通过构造器将接口传入
        this.tv = tv;
    }
    @Override
    public void open() {
        this.tv.play();
    }
}
